require("../scss/admin_home.scss")
require("../scss/admin_home_pictures.scss")

import {Provider} from "react-redux"
import AdminIndexPicturesCtrlContainer from "./containers/admin/AdminPicturesCtrlContainer.jsx"
import AdminHeader from "./components/admin/AdminHeader/AdminHeader.jsx"
import AdminSidebar from "./components/admin/AdminSidebar/AdminSidebar.jsx"

const createStoreWithMiddleware = require("./common/common").createStoreWithMiddleware
import adminIndexPicturesCtrlApp from "./reducers/admin/admin_pictures_reducers.js"

let store = createStoreWithMiddleware(adminIndexPicturesCtrlApp)       // store和reducers绑定在一起（数据和数据处理绑定在一起）


ReactDOM.render(
    <AdminHeader />,
    document.getElementById("AdminHeader")
)

ReactDOM.render(
    <AdminSidebar />,
    document.getElementById("AdminSidebar")
)

ReactDOM.render(
    <Provider store={store}>
        <AdminIndexPicturesCtrlContainer />
    </Provider>,
    document.getElementById("AdminIndexPicturesCtrl")
)